let config = {
  envValue: process.env.envValue,
  host: "192.168.0.103",
  port: 10001,
  noNeedTokenUrlList: [
    "/static/admin/admin.jpg",
    "/static/admin/login1.jpeg",
    "/static/admin/login.jpeg",
    "/pc/login/in",
    "/wechat/login/in",
    "/wechat/version/get",
  ],
};

function getBasePath() {
  let basePath = "";
  let envValue = config.envValue;
  if (envValue === "development") {
    basePath = `http://${config.host}:${config.port}`;
  } else if (envValue === "production") {
    basePath = `https://server.chenshengkai.top`;
  }
  return basePath;
}
config.admin = {
  name: "李珊珊",
  username: "xiaoli",
  password: "jingli",
  roleList: ["超级管理员"],
  avatar: `${getBasePath()}/static/admin/admin.jpg`,
  datetime: new Date().getTime(),
};
let { projectRootPath } = require("../util/index.js");
let questionConfig = require(`${projectRootPath}/config/question/index.js`);
config.question = questionConfig;
module.exports = config;
